#include<iostream>
#include<time.h>
//日志宏定义
#define LOG(format,...) do{\
    time_t t=time(NULL);\
    struct tm *lt=localtime(&t);\
    char time_str[64] = {0};\
    strftime(time_str,63,"%Y-%m-%d %H:%M:%S",lt);\
    fprintf(stdout,"[%s][%s:%d] " format "\n",time_str,__FILE__,__LINE__,##__VA_ARGS__);\
    }while(0)


int main()
{
    LOG("Hello,world!");
    return 0;
}